package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.service.UserService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

/**
 * @author 张义
 * @describe:
 * @date 2021/06/19
 */

@Service("userService")
//@Scope("prototype") // 单例 或者 多例
public class UserServiceImpl implements UserService {

    @Resource(name = "userDao") // @Resource 相当于 @Qualifier 和 @Autowired
    private UserDao userDao;

    public void save() {
        userDao.save();
    }
}
